<!--
 * @Description: 
 * @version: 
 * @Author: Eve
 * @Date: 2019-10-08 14:14:50
 * @LastEditors: Eve
 * @LastEditTime: 2019-10-08 17:27:43
 -->
<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{
      margin:0;
      padding:0;
      box-sizing: border-box;
    }
    .out {
      border: 10px solid red;
      min-height: 20px;
      display:inline-block;
      width: 100%;
    }

    .in {
      width:100%;
      height: 100px;
      background-color: grey;
      float:left;
    }
    .left,.right{
      border:3px solid red;
      height: 100px;
    }
    .left{
      min-width: 200px;
      float:left;
      margin-right: 20px;
    }
    .right{
      border-color:blue;
      display:flow-root;
    }

    .om{
      height: 80px;
      margin-bottom: 30px;
      border:1px solid #000;
    }
    .im{
      height: 60px;
      margin-top: 20px;
      background-color:red;
      display:flex;
      align-items:center;
      justify-content: center;
      flex-direction: column;
    }
  </style>
</head>

<body>
  <!-- 使 BFC 内部的浮动元素不会到处乱跑 -->
  <div class="out">
    <div class="in"></div>
  </div>
  <div>
      我是下面的元素
  </div>

  <div class="left"></div>
  <div class="right"></div>

  <!-- 外边距合并 -->
  <div class="om">
  </div>
  <div class="im"></div>

</body>

</html>